package jsu.lipengcheng.trafficnet.Ai;


import jsu.lipengcheng.trafficnet.common.BeanThread;
import jsu.lipengcheng.trafficnet.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin")
public class AicodeControlle {
    @Autowired
    private AicodeService qwenaicode;

    @GetMapping("/chat")
    public Result aicaht(@RequestParam String mesage){
        String memoryid ="aimemoryid:"+ BeanThread.get().toString();
        String result = qwenaicode.chat(memoryid,mesage);
        return Result.success(result);
    }
}
